misc cleanups from clion. (#881)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Sun, 29 May 2022 12:09:02 +0000 (06:09 -0600)
committerGitHub <noreply@github.com>
Sun, 29 May 2022 12:09:02 +0000 (06:09 -0600)
defs.h
garmin_txt.cc
globalsat_sport.h
html.cc
jeeps/gpsdevice.h
jeeps/gpslibusb.cc
navilink.h
raymarine.cc
smplrout.cc
util.cc

diff --git a/defs.h b/defs.h
index 8e8e698ee53d87911629b6d366fc1ceb83d1c54e..96138483768345a393d632f5c8f4b60b3a2b41a3 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -1068,7 +1068,6 @@ int xasprintf(QScopedPointer<char, QScopedPointerPodDeleter>& strp, const char*
 int xvasprintf(char** strp, const char* fmt, va_list ap);
 char* strupper(char* src);
 char* strlower(char* src);
-signed int get_tz_offset();
 time_t mklocaltime(struct tm* t);
 time_t mkgmtime(struct tm* t);
 bool gpsbabel_testmode();
@@ -1191,11 +1190,6 @@ int parse_speed(const QString& str, double* val, double scale, const char* modul
  */
 unsigned long get_crc32(const void* data, int datalen);
 
-/*
- * From nmea.c
- */
-int nmea_cksum(const char* buf);
-
 /*
  * Color helpers.
  */
index 6b0fcd0a3209fe131504c3d5535a7eeacc129df5..a1fb866138fc749d9a3b8975e85b30cda3703780 100644 (file)
@@ -118,7 +118,6 @@ static int header_fields[unknown_header + 1][MAX_HEADER_FIELDS];
 static int header_ct[unknown_header + 1];
 
 #define GARMIN_UNKNOWN_ALT 1.0e25f
-#define DEFAULT_DISPLAY garmin_display_symbol_and_name
 #define DEFAULT_DATE_FORMAT "dd/mm/yyyy"
 #define DEFAULT_TIME_FORMAT "HH:mm:ss"
 
index ce04e3a7c4a6c20b8258b9c32ec357dfefa6dabc..9200bbe25fd035358af4bf4b69e5189020c7f516 100644 (file)
@@ -255,4 +255,4 @@ private:
     {"timezone", &opt_timezone, "Time zone ID", nullptr, ARGTYPE_STRING, ARG_NOMINMAX, nullptr},
   };
 };
-#endif // GPX_H_INCLUDED_
+#endif // GLOBALSATSPORT_H_INCLUDED_
diff --git a/html.cc b/html.cc
index 1db9f50835fb0984b604bcaa7b67ec8d36c6c0ef..d46cc9f2e6ec4db67bbaa87ac58bb88d3552da2c 100644 (file)
--- a/html.cc
+++ b/html.cc
@@ -75,7 +75,7 @@ HtmlFormat::html_disp(const Waypoint* wpt) const
   gbfprintf(file_out, "<br>\n");
   if (wpt->description != wpt->shortname) {
     if (wpt->HasUrlLink()) {
-      char* d = html_entitize(CSTR(wpt->description));
+      char* d = html_entitize(wpt->description);
       UrlLink link = wpt->GetUrlLink();
       gbfprintf(file_out, "<a href=\"%s\">%s</a>", CSTR(link.url_), d);
       xfree(d);
@@ -139,7 +139,7 @@ HtmlFormat::html_disp(const Waypoint* wpt) const
 
         logpart = xml_findfirst(curlog, "groundspeak:finder");
         if (logpart) {
-          char* f = html_entitize(CSTR(logpart->cdata));
+          char* f = html_entitize(logpart->cdata);
           gbfprintf(file_out, "<span class=\"gpsbabellogfinder\">%s</span> on ", f);
           xfree(f);
         }
index 539c8ebc4f901d6358d0cc2ed248a1a81e54887e..583f4afb7a5f2c9ac95306b395085b8284742619 100644 (file)
@@ -59,4 +59,4 @@
     gps_device_op12 Write_Packet;
   } gps_device_ops;
 
-#endif /* gpsdevice.h */
+#endif /* gpsdevice_h */
index ba04068059c580d6caf3f64eeceb10b48dd59cd9..a0f4c16b9f920b8c4a55877fe6a45731b7407e32 100644 (file)
@@ -328,7 +328,7 @@ garmin_usb_start(struct libusb_device* dev,
   if (ret != LIBUSB_SUCCESS) {
     fatal("libusb_set_configuration failed: %s\n",
           libusb_strerror(static_cast<enum libusb_error>(ret)));
-  };
+  }
 #endif
 
 #if 0
index 3838f7594628f5db231552a76f78fc01df77342f..3f33e9987138ea31a5ae0eabbb9715f3da7b95f2 100644 (file)
@@ -133,4 +133,4 @@ typedef struct __packed {
 
 #endif
 
-#endif  // NAVILINK_H_INCLUDED
+#endif  // NAVILINK_H_INCLUDED_
index 634c6a23f7e9327a80d9ded980cf5fbaef1e1e7b..6ead3f2ff4881efb02f506f4c6e28892e72bc86e 100644 (file)
@@ -52,8 +52,6 @@
 #include <cstdio>
 #include <cstdlib>
 
-using guid_t = unsigned long long;
-
 static inifile_t* fin;
 static gbfile* fout;
 static Waypoint** waypt_table;
index 56921379768a41740e3256f8193e2ef312b729bb..500f3198c0d8d5c93cecb80f6e462a6cdb4a60e5 100644 (file)
@@ -70,8 +70,6 @@
 #if FILTERS_ENABLED
 #define MYNAME "simplify"
 
-#define sqr(a) ((a)*(a))
-
 void SimplifyRouteFilter::free_xte(struct xte* xte_rec)
 {
   delete xte_rec->intermed;
diff --git a/util.cc b/util.cc
index a1d9d9a2ec49cf904eff01634f98b7f83804f56c..981972daec6e72080ef6a6d59d65527bf299844c 100644 (file)
--- a/util.cc
+++ b/util.cc
@@ -623,8 +623,6 @@ si_round(double d)
        works just like mktime but without all the mucking
        around with timezones and daylight savings
 
-       obsoletes get_tz_offset()
-
        Borrowed from lynx GPL source code
        http://lynx.isc.org/release/lynx2-8-5/src/mktime.c
 
@@ -1456,10 +1454,6 @@ char* xml_entitize(const char* str)
   return entitize(str, false);
 }
 
-char* html_entitize(const char* str)
-{
-  return entitize(str, true);
-}
 char* html_entitize(const QString& str)
 {
   return entitize(CSTR(str), true);